E_1=importdata('reportE_1.txt');
E_2=importdata('reportE_2.txt');

x=linspace(0,43,10000);
e=ones(7,10000);
for j=1:10000
        e(1,j)=1;
        e(2,j)=x(j);
        e(3,j)=e(2,j)*(x(j)-6);
        e(4,j)=e(3,j)*(x(j)-10);
        e(5,j)=e(4,j)*(x(j)-13);
        e(6,j)=e(5,j)*(x(j)-17);
        e(7,j)=e(6,j)*(x(j)-20);
end
y_1=E_1'*e;
y_2=E_2'*e;

fig=figure(1);hold on;
plot(x,y_1);plot(x,y_2);
hold off;
frame=getframe(fig);
img=frame2im(frame);
imwrite(img,'E.png');